package com.shunwang.errors.engine.builder.bean;

import java.util.ArrayList;
import java.util.List;

public class NodeBeans {

	private List<NodeBean> list = new ArrayList<NodeBean>();

	public List<NodeBean> getList() {
		return list;
	}

	public void setList(NodeBean list) {
		this.list.add(list);
	}
	
	public boolean contains(NodeBean nodeBean){
		return list.contains(nodeBean);
	}
	
	public NodeBean getNodeBean(String clazzName){
		for(NodeBean bean:list){
			if(bean.containsClazz(clazzName)){
				return bean;
			}
		}
		return null;
	}
	
	public boolean contains(String clazzName){
		for(NodeBean bean:list){
			if(bean.containsClazz(clazzName)){
				return true;
			}
		}
		return false;
	}
	
}
